package org.study.tk.boot.newcommon;

import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Service 接口基类实现类
 *
 * @author Administrator
 */
public class BaseServiceImpl<T, PK> implements BaseService<T, PK> {
    @Autowired
    private CommonMapper<T, PK> commonMapper;

    @Override
    public int delete(T record) {
        return commonMapper.delete(record);
    }

    @Override
    public int deleteByPrimaryKey(PK id) {
        return commonMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int deleteByIds(String ids) {
        return commonMapper.deleteByIds(ids);
    }

    @Override
    public int deleteByIdList(List<PK> idList) {
        return commonMapper.deleteByIdList(idList);
    }

    @Override
    public int deleteByCondition(Object condition) {
        return commonMapper.deleteByCondition(condition);
    }

    @Override
    public int insert(T record) {
        return commonMapper.insert(record);
    }

    @Override
    public int insertSelective(T record) {
        return commonMapper.insertSelective(record);
    }

    @Override
    public int insertList(List<T> list) {
        return commonMapper.insertList(list);
    }

    @Override
    public T selectOne(T record) {
        return commonMapper.selectOne(record);
    }

    @Override
    public List<T> select(T record) {
        return commonMapper.select(record);
    }

    @Override
    public List<T> selectAll() {
        return commonMapper.selectAll();
    }

    @Override
    public int selectCount(T record) {
        return commonMapper.selectCount(record);
    }

    @Override
    public T selectByPrimaryKey(PK id) {
        return commonMapper.selectByPrimaryKey(id);
    }

    @Override
    public boolean existsWithPrimaryKey(PK key) {
        return commonMapper.existsWithPrimaryKey(key);
    }

    @Override
    public List<T> selectByIds(String ids) {
        return commonMapper.selectByIds(ids);
    }

    @Override
    public List<T> selectByIdList(List<PK> idList) {
        return commonMapper.selectByIdList(idList);
    }

    @Override
    public List<T> selectByCondition(Object condition) {
        return commonMapper.selectByCondition(condition);
    }

    @Override
    public int selectCountByCondition(Object condition) {
        return commonMapper.selectCountByCondition(condition);
    }

    @Override
    public int updateByPrimaryKey(T record) {
        return commonMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateByPrimaryKeySelective(T record) {
        return commonMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByCondition(T record, Object condition) {
        return commonMapper.updateByCondition(record, condition);
    }

    @Override
    public int updateByConditionSelective(T record, Object condition) {
        return commonMapper.updateByConditionSelective(record, condition);
    }

    @Override
    public int batchUpdateSelective(List<T> list) {
        return commonMapper.batchUpdateSelective(list);
    }

    @Override
    public int batchUpdate(List<T> list) {
        return commonMapper.batchUpdate(list);
    }
}
